﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage.Master" AutoEventWireup="true"
    CodeBehind="NewsManage.aspx.cs" Inherits="ZF.WS.Admin.NewsManage" %>
<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
<%@ Register src="../../UserControls/SWFUpLoad.ascx" tagname="SWFUpLoad" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script>

        $(function() {

            $.formValidator.initConfig({ formid: document.forms[0].id, onerror: function(msg) { alert(msg) } });
            $(".tbTitle").formValidator({ tipid: "tbTitleTip", onshow: " ", onfocus: "  ", oncorrect: " ", onempty: "  " })
    .inputValidator({ min: 1, onerror: "该项不能为空" });

        });
     
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="editContainer"> 
        <table class=" w100_  edit ">
            <tbody>
                <tr>
                    <th colspan="4">
                        <div class="c">
                            新闻资讯管理
                        </div>
                    </th>
                </tr>
                 <tr>
                    <td class="ll">
                        <div class="c">
                            <span class="xh_">*</span>标题：
                        </div>
                    </td>
                    <td class="lr" colspan="3">
                        <div class="c">
                            <zf:TextBox runat="server" ID="tbTitle" class="lltxt"></zf:TextBox>
                            <span class="zx_" id="tbTitleTip"></span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="ll">
                        <div class="c">
                            <span class="xh_">*</span>类型：
                        </div>
                    </td>
                    <td class="lr" colspan="3">
                        <div class="c">
                             <zf:DropDownList runat="server" ID="ddlType" class="ddl">
                             </zf:DropDownList>
                            <span class="zx_" id="Span1">如果选择特别关注则需要选择缩略片</span>
                        </div>
                    </td>
                </tr>
               
                <tr>
                    <td class="ll">
                        <div class="c">
                            <span class="xh_"></span>缩略图：
                        </div>
                    </td>
                    <td class="lr" colspan="3">
                        <div class="c"> <uc1:SWFUpLoad ID="SWFUpLoad1" UpLoadURL="/uploadfile.aspx?type=news" FileLimit="1" maxsize="500"   runat="server" />
                             
                             <zf:PlaceHolder ID="PlaceHolder1" runat="server" BindOper="Edit">
                                <zf:TextBox runat="server" ID="tbPhoto" class="dn_"></zf:TextBox>
                                <style>
                                    .ulimg li
                                    {
                                        float: left;
                                        width: 100px;
                                        margin-right: 10px;
                                        text-align: center;
                                    }
                                    .ulimg li img
                                    {
                                        width: 100px;
                                        height: 100px;
                                    }
                                </style>
                                <div class="ulimg">
                                    <zf:ListView runat="server" ID="lvImgList">
                                        <LayoutTemplate>
                                            <ul>
                                                <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                                </zf:PlaceHolder>
                                            </ul>
                                        </LayoutTemplate>
                                        <ItemTemplate>
                                            <li>
                                                <img src="/photo/news/<%#Eval("File") %>" />
                                                <input type="button" onclick="DelPhoto(this,'<%#Eval("File") %>')" value="删除图片" />
                                            </li>
                                        </ItemTemplate>
                                    </zf:ListView>
                                </div>

                                <script>

                                    function DelPhoto(obj, file) {
                                        var result = $(".tbPhoto").val().replace(file, "");
                                        $(".tbPhoto").val(result);
                                        $(obj.parentNode).remove();
                                    }
                                </script>

                            </zf:PlaceHolder>
                             
                             
                      
                            <span class="zx_" id="Span4"></span>
                        </div>
                    </td>
                </tr>
                  <tr >
                    <td class="ll">
                        <div class="c">
                            <span class="xh_"></span>状态设置：
                        </div>
                    </td>
                    <td class="lr" colspan="3">
                        <div class="c">
                             <zf:CheckBox runat="server"  ID="cbFocus" Text="焦点显示" Visible="false" />
                              <zf:CheckBox runat="server"  ID="cbOverhead" Text="顶置显示" />
                            <span class="zx_" id="Span3"></span>
                        </div>
                    </td>
                </tr>
                 <tr>
                    <td class="ll">
                        <div class="c">
                            <span class="xh_"></span>作者：
                        </div>
                    </td>
                    <td class="lr" colspan="3">
                        <div class="c">
                            <zf:TextBox runat="server" ID="tbAuthor" class="stxt"></zf:TextBox>
                            <span class="zx_" id="tbAuthorTip"></span>
                        </div>
                    </td>
                </tr>
                 <tr>
                    <td class="ll">
                        <div class="c">
                            <span class="xh_"></span>来源：
                        </div>
                    </td>
                    <td class="lr" colspan="3">
                        <div class="c">
                            <zf:TextBox runat="server" ID="tbFrom" class=" lltxt"></zf:TextBox>
                            <span class="zx_" id="tbFromTip"></span>
                        </div>
                    </td>
                </tr>
               
                <tr>
                    <td class="ll">
                        <div class="c">
                            <span class="xh_"></span>正文：
                        </div>
                    </td>
                    <td class="lr" colspan="3">
                        <div class="c">
                    
                            <FCKeditorV2:FCKeditor  EditorAreaCSS="msgContent" ID="FCKeditor1" EnableXHTML="false"  runat="server" Height="400px" Width="90%"
                              ToolbarStartExpanded="false" >
                    </FCKeditorV2:FCKeditor>
                
                            <span class="zx_" id="Span2"></span>
                        </div>
                    </td>
                </tr>
                
               
            </tbody>
            <tbody>
                <tr class="b">
                    <td colspan="4">
                        <div>
                            <zf:Button ID="btAdd" BindOper="AddNew" class="linkbtn addSubmit" runat="server" OnClick="AddSubmit"
                                Text=" 添 加 "></zf:Button>
                            <zf:Button ID="btEdit" BindOper="Edit" class="linkbtn addSubmit" runat="server" OnClick="EditSubmit"
                                Text=" 修 改 "></zf:Button>
                            <input type="button" class="linkbtn" value=" 取 消 " onclick="doPage('NewsList.aspx');" />
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</asp:Content>
